using System;
using System.Collections.Generic;
using Main.Details;
using UnityEngine;

namespace Main.Light
{
    [CreateAssetMenu(fileName = "LightPattenList_SO", menuName = "ScriptableObject/LightPattenList_SO", order = 0)]
    public class LightPattenList_SO : ScriptableObject
    {
        public List<LightDetails> lightDetails;

        public bool TryGetLightDetails(Season season, LightShift lightShift, out LightDetails lightDetails)
        {
            foreach (var item in this.lightDetails)
            {
                if (item.season == season && item.lightShift == lightShift)
                {
                    lightDetails = item;
                    return true;
                }
            }
            lightDetails = null;
            return false;
        }
    }

    [Serializable]
    public class LightDetails
    {
        public Season season;
        public LightShift lightShift;
        public Color lightColor;
        public float lightAmount;
    }

}